package com.mlf.factory.easyFactory.spring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

// 工厂类
@Service
public class PaymentFactory {
    @Autowired
    private Map<String, PaymentService> paymentServices;
    
    public PaymentService getService(String type) {
        return paymentServices.get(type);
    }
}